<?php

use App\Http\Controllers\BaiDuPanController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', [BaiDuPanController::class, 'index']);
Route::get('s', [BaiDuPanController::class, 'analysis'])->name('root');
Route::get('d', [BaiDuPanController::class, 'download'])->name('down');
// Route::get('test', function (\Illuminate\Http\Request $request) {
//     $sid = '1wnYBO';
//     // $sid = '1db34kBj_LabndLhNV7chaA';
//     $pan = new \App\Helpers\libs\BaiDuPan();
//     $lnd = $pan->getBdLND($sid, '18qd');
//     $shareResult = $pan->getAnalysis($sid, $lnd);
//     return $shareResult;
//     $shareId = $shareResult['shareid'];
//     $uk = $shareResult['share_uk'];
//     $path = '/sharelink2613570661-885740775056924/儿童早教视频/竹兜/竹兜7-12月版/妈妈去上班';
//     $sons = $pan->getDirFiles($path, $lnd, $shareId, $uk);
//     return $sons;
// });
